#pragma once

#include "MonitorWorktable.h"

class CWorktableManager
{
	typedef map<DWORD, CMonitorWorktable*> CWorktableMap;
private:
	CWorktableMap m_WorktableMap;
	CMonitorWorktable* m_pActiveWorktable;

private:
	CWorktableManager(void);
	~CWorktableManager(void);

public:
	inline static CWorktableManager& GetInstance(){
		static CWorktableManager Inst;
		return Inst;
	}

	void Reset();

	void RegisterWorktable(CMonitorWorktable *pWorktable);

	CMonitorWorktable* GetWorktable(DWORD dwID);
	inline CMonitorWorktable* GetActiveWorktable() const{
		return m_pActiveWorktable;
	}

	void SetActiveWorktable(DWORD dwID);
};


#define theWorktableManager CWorktableManager::GetInstance()